package designMode.decoratorPattern;

/**
 * @ClassName Soy
 * @Description 调料2
 * @Author LIBOFEI
 * @Date 2020/6/15 16:28
 * @Version 1.0
 **/
public class Soy extends CondimentDecorator{
    Beverage beverage;
    public Soy(Beverage beverage){
        this.beverage = beverage;
    }
    @Override
    public String getDescription() {
        return beverage.getDescription() + ",SOY";
    }

    @Override
    public int getSize() {
        return beverage.getSize();
    }

    @Override
    public double cost() {
        return 19 + beverage.cost();
    }
}
